There is a somewhat trivial issue with XendCheckpoint.py right now in
authorEwan Mellor <ewan@xensource.com>
Tue, 21 Nov 2006 10:19:01 +0000 (10:19 +0000)
committerEwan Mellor <ewan@xensource.com>
Tue, 21 Nov 2006 10:19:01 +0000 (10:19 +0000)
that it logs everything written to stderr by xc_save and xc_restore as
errors whereas in fact the vast majority of this output is
information/debug (and all actual errors are marked by the string ERROR:
at the start of the message) -- this is confusing to folks looking at
the logs and makes automated log analysis tricky.

Fix is to scan for the ERROR: string and log anything without it using
log.info instead.

Signed-off by: Simon Graham <Simon.Graham@stratus.com>

tools/python/xen/xend/XendCheckpoint.py

index e8894933fbacca1a7e9bfc2a65ac278b48a6c8a3..b16413f3102182dec8945c0870d99abf1eae0d9a 100644 (file)
@@ -234,4 +234,9 @@ def slurp(infile):
         if line == "":
             break
         else:
-            log.error('%s', line.strip())
+            line = line.strip()
+            m = re.match(r"^ERROR: (.*)", line)
+            if m is None:
+                log.info('%s', line)
+            else:
+                log.error('%s', m.group(1))